<template>
    <div-row :obj="obj">
        <h1 class="Title" v-html="obj.title"/>
    </div-row>
</template>
<script>

export default {
    name: 'Title',
    props: {
        obj: {
            type: Object
        }
    },
    watch: {
        'obj.titleKey': {
            handler(newValue, oldValue) {
            //    this.$set(this.obj,'title',this.obj[this.obj.titleKey])
                this.$nextTick(() => { // 在dom渲染完后,再执行动画
                    this.obj.title = this.obj[this.obj.titleKey]
                })
            },
            deep: true
        }
    }
}
</script>

